%   Licensed under the Apache License, Version 2.0 (the "License");
%   you may not use this file except in compliance with the License.
%   You may obtain a copy of the License at
%  
%       http://www.apache.org/licenses/LICENSE-2.0
%  
%   Unless required by applicable law or agreed to in writing, software
%   distributed under the License is distributed on an "AS IS" BASIS,
%   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%   See the License for the specific language governing permissions and
%   limitations under the License.
%  
%   $Revision$
%   $Date$
%   $Author$
%   $HeadURL$
%

function taskSpec = parse_polyathlon_taskspec(taskSpecJavaString)	
    %Observation Space: 6 dimensional, continuous valued in [0,1]
    %Action Space: 6 discrete actions
    %Rewards: Reward range (maybe loose) will be provided by the task spec.

    taskSpec = org.rlcommunity.rlglue.codec.taskspec.TaskSpec(taskSpecJavaString);

    assert (taskSpec.getNumDiscreteObsDims() == 0);
    %assert (taskSpec.getNumContinuousObsDims() == 6);
    assert (~taskSpec.getContinuousObservationRange(0).hasSpecialMinStatus());
    assert (~taskSpec.getContinuousObservationRange(0).hasSpecialMaxStatus());
    
    assert (taskSpec.getNumDiscreteActionDims() == 1);
    assert (taskSpec.getNumContinuousActionDims() == 0);
    assert (~taskSpec.getDiscreteActionRange(0).hasSpecialMinStatus());
    assert (~taskSpec.getDiscreteActionRange(0).hasSpecialMaxStatus());
    %assert (taskSpec.getDiscreteActionRange(0).getRangeSize() == 6);
    
end    

